const mongoose = require("mongoose");
const modelSchema = new mongoose.Schema(
  //定义表
  {
    name: {
      type: String,
    },
    desc: {
      type: String,
      default: "",
    },
   
    coverImage: {
      type: String,
      default: "",
    },
    playUrl: {
      type: String,
      default: "",
    },
  },
  {
    timestamps: true,
  }
);

const Model = mongoose.model("movie", modelSchema);
//module表示当前模块，这个变量是一个对象，它的exports属性（即module.exports）是对外的接口
module.exports = Model;
